import route from '@/router/index'

export const hasPermission = (el, binding) => {
  if (binding?.value && route.currentRoute.value?.meta?.auth) {
    if (!route.currentRoute.value.meta.auth.includes(binding.value)) {
      el.remove()
    }
  }
}

export default hasPermission
